package ysq.xyg.host.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 房产模块-动态订阅实体类
 *
 * @author congcong tao
 * @date 2020-3-6 10:12:54
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_host_item_subscription")
public class HostItemSubscription implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 应用主键
     */ 
	@Column(name = "account_id")
	private String accountId;

	/**
     * 会员主键
     */ 
	@Column(name = "member_id")
	private String memberId;

	/**
	 * 会员微信主键
	 */
	@Column(name = "open_id")
	private String openId;

	/**
     * 楼盘主键
     */ 
	@Column(name = "item_id")
	private String itemId;

	/**
     * 发送状态1=发送2=不发送
     */ 
	@Column(name = "status")
	private String status;

	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	@Transient
	private String itemName;

	@Transient
	private String memberName;

	@Transient
	private String memberPhone;

	public HostItemSubscription(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.updateTime = new Date();
	}
}